import React, { RefObject } from 'react';
import { IFlex } from './Flex.types';
import { StyledFlex } from './Flex.styled';


const Flex = React.forwardRef<HTMLDivElement, IFlex>(({ children, ...nextProps }, ref) => 
    (
        <StyledFlex {...nextProps} ref={ref}>{children}</StyledFlex>
    )
);

Flex.displayName = "flex";

export default Flex;
